//
//  OrderModel.m
//  有材网
//
//  Created by 肖扬 on 16/2/1.
//  Copyright © 2016年 肖扬. All rights reserved.
//

#import "OrderModel.h"
#import "homeModel.h"
@implementation OrderModel
@synthesize list;
-(id)init{
    self = [super init];
    if (self) {
        self.list = [NSMutableArray array];
    }
    return self;
}
-(void)parseResponseData:(NSString *)responseString{
    [super parseResponseData:responseString];
    NSMutableDictionary *json = [responseString objectFromJSONString];
    NSMutableDictionary *data = [json objectForKey:@"data"];
    NSMutableArray *listArray = [data objectForKey:@"list"];
    if ([listArray count]!=0) {
        for (int i = 0; i < [listArray count]; i++) {
            NSMutableDictionary *dic = [listArray objectAtIndex:i];
            homeModelSupply *model = [[homeModelSupply alloc]init];
            model.no = [dic objectForKey:@"no"];
            model.supplier_mid = [dic objectForKey:@"supplier_mid"];
            model.purchaser_mid = [dic objectForKey:@"purchaser_mid"];
            model.material_id = [dic objectForKey:@"material_id"];
            model.brand_id = [dic objectForKey:@"brand_id"];
            
            model.producer_id = [dic objectForKey:@"producer_id"];
            model.veneer = [dic objectForKey:@"veneer"];
            model.number = [dic objectForKey:@"number"];
            model.price = [dic objectForKey:@"price"];
            model.amount = [dic objectForKey:@"amount"];
            
            model.post_address = [dic objectForKey:@"post_address"];
            model.freight = [dic objectForKey:@"freight"];
            model.payment_type = [dic objectForKey:@"payment_type"];
            model.payment_id = [dic objectForKey:@"payment_id"];
            model.status = [dic objectForKey:@"status"];
            
            model.supply_id = [dic objectForKey:@"supply_id"];
            model.purchase_id = [dic objectForKey:@"purchase_id"];
            model.creator = [dic objectForKey:@"creator"];
            model.mender = [dic objectForKey:@"mender"];
            model.ctime = [dic objectForKey:@"ctime"];
            
            model.mtime = [dic objectForKey:@"mtime"];
            model.nickname = [dic objectForKey:@"nickname"];
            model.company_name = [dic objectForKey:@"company_name"];
            model.material_name = [dic objectForKey:@"material_name"];
            model.ctime_int = [dic objectForKey:@"ctime_int"];
            
            model.home_id = [dic objectForKey:@"id"];
            model.mid = [dic objectForKey:@"mid"];
            model.brand_other = [dic objectForKey:@"brand_other"];
            model.future = [dic objectForKey:@"future"];
            model.model = [dic objectForKey:@"model"];
            
            model.eplevel = [dic objectForKey:@"eplevel"];
            model.texture = [dic objectForKey:@"texture"];
            model.surface = [dic objectForKey:@"surface"];
            model.unit_number = [dic objectForKey:@"unit_number"];
            model.length = [dic objectForKey:@"length"];
            
            model.width = [dic objectForKey:@"width"];
            model.thickness = [dic objectForKey:@"thickness"];
            model.min_buy_number = [dic objectForKey:@"min_buy_number"];
            model.price2 = [dic objectForKey:@"price2"];
            model.title = [dic objectForKey:@"title"];
            
            model.province = [dic objectForKey:@"province"];
            model.city = [dic objectForKey:@"city"];
            model.image_url = [dic objectForKey:@"image_url"];
            model.remark = [dic objectForKey:@"remark"];
            model.upload_log_id = [dic objectForKey:@"upload_log_id"];
            model.is_sales = [dic objectForKey:@"is_sales"];
            
            model.create_manager = [dic objectForKey:@"create_manager"];
            model.audit_status = [dic objectForKey:@"audit_status"];
            model.audit_manager = [dic objectForKey:@"audit_manager"];
            model.audit_comment = [dic objectForKey:@"audit_comment"];
            model.pubtime = [dic objectForKey:@"pubtime"];
            model.producer_name = [dic objectForKey:@"producer_name"];
            
            model.brand_name = [dic objectForKey:@"brand_name"];
            model.pics = [dic objectForKey:@"pics"];
            model.province_name = [dic objectForKey:@"province_name"];
            model.city_name = [dic objectForKey:@"city_name"];
            [self.list addObject:model];
        }
    }
}
@end

@implementation OrderInformation

@synthesize no,supplier_mid,purchaser_mid,material_id,brand_id,veneer,number,price,amount,post_address,freight,payment_type,payment_id,status,supply_id,purchase_id,creator,mender,ctime,mtime,nickname,company_name,material_name,ctime_int,home_id,mid,brand_other,future,model,eplevel,texture,surface,unit_number,length,width,thickness,min_buy_number,price2,title,province,city,image_url,upload_log_id,is_sales,create_manager,audit_status,audit_manager,audit_comment,pubtime,producer_name,brand_name,pics,province_name,city_name;
-(id)init{
    self = [super init];
    if (self) {
        self.pics = [NSMutableArray array];
    }
    return self;
}

@end
